from django.urls import path, include
from rest_framework import routers

from books import views

# 注册路由
router = routers.DefaultRouter()
router.register(r'books', views.BooksViewSet, basename='books')
router.register(r'publisher', views.PublisherViewSet, basename='publisher')
router.register(r'bookshelf', views.BookshelfViewSet, basename='bookshelf')

urlpatterns = [
    path('', include(router.urls)),
]
